<!DOCTYPE html>
<html>
<head>
  <title>Rails Logs Viewer</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <!-- Latest compiled and minified CSS -->
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

  <style type="text/css">
      .menu-box {
          height: 100vh;
          overflow-x: auto;
          overflow-y: auto;
          margin-right: -30px;
      }
      .console-box {
          padding: 20px;
          font-family: Monospace;
          background-color: #212121;
          color: #ffffff;
          height: 100vh;
          overflow: auto;
          font-size: 12px;
      }
  </style>

</head>
<body>

<div class="container-fluid">

    <div class="row">
      <div class="col-md-3">
        <div class="menu-box">
          <h3>Logs</h3>
          <%= (LogsViewer::DisplayHelper.get_nested_logs(data[:list]).html_safe) %>
        </div>
      </div>
      <div class="col-md-9">
        <div class="console-box">
        <% unless data[:lines].empty? %>

            <% data[:lines].each_line do |line| %>
                <%= line %><br>
            <% end %>

        <% end %>
        </div>
      </div>

    </div>

</div>

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>

</body>
</html>